﻿@{
    ViewBag.Title = "会员登录";
    Layout = "~/Views/Shared/Main.cshtml";
    TempData["sidecalss"] = "EveryDayWisdom";

    var SearchParma = ViewData["SearchParma"] as HanGu.Entity.UniversallySearchParam ?? new HanGu.Entity.UniversallySearchParam();

}
@section Header
{


    <style>
        .contentLeft
        {
            width: 100%;
        }
        #partContent
        {
            width: 100%;
        }
        .movieContain
        {
            width: 100%;
            margin-top: 5px;
        }
    </style>

    
}
@section Banner
{
    @Html.Partial("Banner")
}
@section Content{
    <div class="contentLeft">
        <table cellpadding="0" cellspacing="0" id="partContent">
            <tr>
                <td>
                    <div class="ContentTitle">
                        <div class="ContentTitleLeft">
                            <img src="/Content/images/viploginTitle.gif" width="145" height="26" alt=""></div>
                        <div class="ContentTitleRight">
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="content">
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <img src="/Content/images/zzjt.png" width="400" />
                            </td>
                            <td>
                                <div class="loginForm">
                                    <form action="/vip/login" onsubmit="return login();">
                                    <p>
                                        <label>
                                            用户名：</label>
                                        <input type="text" name="User" id="User" class="login_input" style="width: 150px" />
                                    </p>
                                    <p>
                                        <label>
                                            密&nbsp;&nbsp;&nbsp;码：</label>
                                        <input type="password" name="Pwd" id="Pwd" class="login_input" style="width: 150px" />
                                    </p>
                                    <p>
                                        <label>
                                            验证码：</label>
                                        <input class="code" name="code" id="code" type="text" size="5" />
                                        <span>
                                            <img id="valiCode" style="cursor: pointer;" src="/Admin/login/GetValidateCode" alt="验证码"
                                                onclick="this.src='/Admin/login/GetValidateCode?time=' + (new Date()).getTime();" />
                                        </span>
                                    </p>
                                    <div class="login_bar">
                                    <div style="width:60px; float:left"><input class="sub" type="submit" value="登陆" style="width:50px"/></div>
                                    <div style="width:60px; float:left;white-space: nowrap;"><a href="/vip/forgetpwd">忘记密码？</a></div>
                                    <div style="width:60px; float:left;white-space: nowrap;"><a href="/vip/register">免费注册</a></div>
                                        
                                    </div>
                                    </form>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
}
@section Side{
    @Html.Partial("Side")
}
<script>
    function login() {
        var User = $("#User").val();
        var Pwd = $("#Pwd").val();
        var code = $("#code").val();
        if (User == "" || Pwd == "" || code == "") {
            alert("账号，密码和验证码不能为空");
            return false;
        }
        $.ajax({
            type: "POST",
            url: "/vip/login",
            data: "User=" + User + "&Pwd=" + Pwd + "&code=" + code,
            success: function (data) {
                var json = eval("(" + data + ")");
                if (json.statusCode == 200) {
                    window.location = '@Url.Action("MyInfo","vip")';
                }
                else {
                    alert(json.message);
                }
            }
        });
        return false;
    }
    </script>